<%-- 
    Document   : AddOutlet
    Created on : Oct 1, 2011, 4:10:27 AM
    Author     : KimberlyJordan
--%>

<%@page import="EntityState.PartnerAccountState"%>
<%@page contentType="text/html" pageEncoding="UTF-8"%>
<%@page import="java.util.List, java.util.ArrayList"%>
<%@page import="java.util.ArrayList, BusinessLogic.Constants" %>
<!DOCTYPE html>
<html>
    <head>
        <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
        <title>JSP Page</title>
        <script language="javascript" type="text/javascript" src="../TransactWeb/js/jquery-1.6.4.min.js"></script>
        <script language="javascript" type="text/javascript" src="../TransactWeb/js/jquery.form.js"></script>
        <script type="text/javascript" src="../TransactWeb/js/fieldsetCollapse.js"></script>
        <script type="text/javascript" src="../TransactWeb/js/tcubmenu.js"></script>
        <script type="text/javascript" src="../TransactWeb/js/accordion.js"></script>
        <script type="text/javascript" src="../TransactWeb/js/scroller.js"></script>
        <script type="text/javascript" src="../TransactWeb/js/Utilities.js"></script>


        <link rel="stylesheet" type="text/css" href="../TransactWeb/css/gridsys.css" />
        <link rel="stylesheet" type="text/css" href="../TransactWeb/css/reset1.css" />
        <link rel="stylesheet" type="text/css" href="../TransactWeb/css/tcube.css" />
        <link href="../TransactWeb/css/gridsys.css" rel="stylesheet" type="text/css" />
        <link rel="stylesheet" type="text/css" href="../TransactWeb/css/tcubaccd.css" />
        <script type="text/javascript">
            // Check Session to show relevant menus
            // Be sure to import Utilities.js in the script file	and declare partnerMenu as a servelet element
            window.onload = showPage('partnerMenu', 'leftnav');

            // If not logged in, use : 
            //window.onload = showPage('topMenu', 'topmenu');
            //IF logged in use : 
            window.onload = showPage('topMenulogout', 'topmenu');

            //welcome msg
            window.onload = showPage('welcomeMenu','welcome');
            //footer
            window.onload = showPage('partnerFooter','footer');
            
            $(document).ready(function() {
                // bind 'myForm' and provide a simple callback function
                $('#addOutletForm').ajaxForm({
                    success: function(response){
                        var status = $(response).find("status").text();
                        $("#addOutletStatus").html(status);
                    },
                    dataType: "xml"
                });
                               
            }); 
        </script>
    </head>
    <body>
        <div class="container_12">
            <!-- Header Nav -->
            <div class="grid_3"><img src="../TransactWeb/img/reservation/foodsglogo.png" width="146" height="178" /></div>
            <div class="grid_9 nav">
                <div id="topmenu"></div>
            </div>

            <div class="grid_12">
                <hr size="3" color="#CC6600" />
            </div>
            <!-- Welcome Message -->
            <div class="grid_12 welcome">
                <div id="welcome"></div> 
            </div>
            <!-- End Welcome Message-->

            <!-- End of Header Nav -->
            <!-- Menu / Planner -->
            <div class="grid_4">
                <div id="leftnav"></div>
            </div>
            <!--End Menu/ Planner -->
            <!-- Content -->
            <div class="grid_8 content">
                <!-- Content Header -->

                <table width="600" border="0">
                    <tr>
                        <td class="content_title">Outlet Management</td>
                    </tr>
                    <tr>
                        <td class="content_purpose">Add Outlet</td>
                    </tr>
                </table>
                <div id="addOutletStatus" style="padding-left: 10px; color: #f7964f; margin-bottom: 10px;"></div>
                <!-- End Content Header-->
                <!-- Form -->
                <form action="AddOutletStatus" id="addOutletForm" method="post" encType="multipart/form-data">
                    <table width="600" border="0" class="formstyle">
                        <tr>
                            <td>Outlet Name</td>
                            <td><input type="text" name="name" /></td>
                        </tr>
                        <%
                            for (int i = 1; i < Constants.FILE_MAX_NUM_OF_ITEM_PICTURE + 1; i++) {
                        %>
                        <tr>
                            <td>Upload Picture <%= i%></td>
                            <td><input name="<%= i%>" type="file" /></td>
                        </tr>
                        <tr>
                            <td>Description <%= i%></td>
                            <td><input type="text" name="<%= "description" + i%>" id="description" /></td>
                        </tr>
                        <%
                            }
                        %>
                        <tr>
                            <td>Address</td>
                            <td><input type="text" name="address1"  /></td>
                        </tr>
                        <tr>
                            <td>&nbsp;</td>
                            <td><input type="text" name="address2"  /></td>
                        </tr>
                        <tr>
                            <td>Postal Code</td>
                            <td><input type="text" name="postalCode" /></td>
                        </tr>
                        <tr>
                            <td>Country Code</td>
                            <td><input type="text" name="countryCode" /></td>
                        </tr>
                        <tr>
                            <td>Phone</td>
                            <td><input type="text" name="phone" /></td>
                        </tr>
                        <tr>
                            <td>Country</td>
                            <td><input type="text" name="country" /></td>
                        </tr>
                        <tr>
                            <td>Province</td>
                            <td><input type="text" name="province" /></td>
                        </tr>
                        <tr>
                            <td>City</td>
                            <td><input type="text" name="city" /></td>
                        </tr>
                        <tr>
                            <td>Business Email</td>
                            <td><input type="text" name="businessEmail" /></td>
                        </tr>
                        <tr>
                            <td>Upload Outlet Layout</td>
                            <td><input name="layout" type="file" /></td>
                        </tr>
                        <tr>
                            <td colspan="2"><input name="addoutlet" type="submit" value="Add Outlet" /></td>

                        </tr>
                    </table>

                    <!-- End Form -->
            </div>
            <!-- End Content -->
            <!-- Footer -->
            <div class="grid_12 footer">
                <div id="footer"></div>

            </div>
            <!-- End Footer-->
        </div>
    </body>
</html>
